﻿using System;
using Framework;

namespace Enterprise.Admin.Handle
{
    /// <summary>
    /// 获取详细JSON
    /// </summary>
    public partial class GetCandidatesDetailJson : AdminBasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var id = Fq("id").SafeToInt();
            var candidatesService = new CandidatesService();
            var row = candidatesService.GetById(id);
            object result = new
                                {
                                    CoCandidatesId = row["CoCandidatesId"].SafeToString(),
                                    CoPost = row["CoPost"].SafeToString(),
                                    CoWorkExperience = row["CoWorkExperience"].SafeToString(),
                                    CoEducation = row["CoEducation"].SafeToString(),
                                    CoAge = row["CoAge"].SafeToString(),
                                    CoDate = row["CoDate"].SafeToDateTime().ToString("yyyy-MM-dd HH:mm:ss"),
                                    CoLanguage = row["CoLanguage"].SafeToString(),
                                    CoEmail = row["CoEmail"].SafeToString(),
                                    CoName = row["CoName"].SafeToString(),
                                    CoMobile = row["CoMobile"].SafeToString(),
                                    CoQq = row["CoQq"].SafeToString(),
                                    CoPhone = row["CoPhone"].SafeToString(),
                                    CoSummary = row["CoSummary"].SafeToString(),
                                    CoIdentNumber = row["CoIdentNumber"].SafeToString(),
                                    CoWorkHistory = row["CoWorkHistory"].SafeToString(),
                                    CoSex = row["CoSex"].SafeToString()
                                };
            Json(result);
        }
    }
}